Folder Trigger

File Watcher

See Also

Introduction to Triggers, Available Triggers

Description

Triggers the task when files are added,modified or deleted in the folder(s) specified.

NOTE TO NETWORK USERS:
Folder watcher triggers will work on network drives and shares only if the machine is part of a domain and if the computer AutoMate is running on has at least Read access to the folder being watched.  The trigger will not work on mapped drives or network shares that belong to a Win9x workgroup.

Practical Usage

Commonly used to monitor folders for "incoming files" - when these files arrive, they are automatically processed ("processed" could be any combination of copying, reading, uploading etc).

Return Value

When this trigger is activated - it automatically passes the AMTrigger object to the task.

The following properties are populated:

AMTrigger.Trigger
String
The name of the trigger that started the task.  For this trigger, the value is always "AMFILETRIGGER".
AMTrigger.Filename
Text

Specifies the path and filename of the file that was added,modified or deleted (depending on the trigger settings) .

AMTrigger.Action
Text

Specifies the action that took place to cause the trigger.  The value can be one of the following: "FILE ADDED", "FILE DELETED", "FILE MODIFIED", "TOO MANY FILES", "ONE FILE TOO BIG"

AMTrigger.Size
Number

When AMTrigger.Action is "TOO MANY FILES" or "ONE FILE TOO BIG", this value is the total  number of files present to cause the trigger, or the size of the file (in KB) of the offending file respectively.

AMTrigger.NBFiles
Number

When AMTrigger.Action is "TOO MANY FILES", this value is the total number of files in the directory being monitored.